x86/ucode/AMD: late load the patch on every logical thread
authorSergey Dyasli <sergey.dyasli@citrix.com>
Fri, 3 Mar 2023 07:03:43 +0000 (08:03 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Mar 2023 07:03:43 +0000 (08:03 +0100)
commitec5b058d2a6436a2e180315522fcf1645a8153b4
tree1408903ecbd885e7495f6c6d27cf801fbb22e110
parentfa8250f1920413f02b63551a6a4d8ef0b47891a8
x86/ucode/AMD: late load the patch on every logical thread

Currently late ucode loading is performed only on the first core of CPU
siblings.  But according to the latest recommendation from AMD, late
ucode loading should happen on every logical thread/core on AMD CPUs.

To achieve that, introduce is_cpu_primary() helper which will consider
every logical cpu as "primary" when running on AMD CPUs.  Also include
Hygon in the check for future-proofing.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: f1315e48a03a42f78f9b03c0a384165baf02acae
master date: 2023-02-28 14:51:28 +0100
xen/arch/x86/cpu/microcode/core.c